package com.zx.callback.common.enums;

/**
 * 积分 使用类型
 * @author ：yanst
 * @since: 2017/10/12
 * @history：(date editor desc)
 */
public enum ScoreTypeEnum {
    RECHARGE((byte)0,"充值"),
    SMS((byte)1,"短信"),
    CLOUD_BACKUP((byte)2,"云备份")
    ;
    ScoreTypeEnum(byte  key, String value) {
        this.key = key;
        this.value = value;
    }

    public static boolean contains(Byte code) {
        if (code != null) {
            for (ScoreTypeEnum e : ScoreTypeEnum.values()) {
                if (e.getKey() == code.byteValue()) {
                    return true;
                }
            }
        }
        return false;
    }

    private byte key;

    private String value;

    public byte getKey() {
        return key;
    }

    public void setKey(byte key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
